# Copyright 2010 G. M. Bond. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.

__author__ = "G. Matthew Bond <gmattbond+python@gmail.com>"

import sys

class Graph(object):
    
    """
    Base class for adapting graphviz dot libraries for use in lib2to3.

    This class provides the interface that should be used for adapting a
    graphviz library for use with the graph_node method of compiled patterns in
    fixers. This class was added so there would be no direct dependence on any
    one graphviz implementation.
    """

    def add_node(self, node_name):
        """Add a node calle node_name to the graph."""
        raise NotImplementedError

    def add_edge(self, parent, child):
        """Add an edge between parent and child."""
        raise NotImplementedError

    def output(self, fp=sys.stdout):
        """Output the graph in dot format to the file descriptor fd."""
        raise NotImplementedError



